package com.producer.producerfeign;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 使用feign注解方式调用eureka，
 *
 * 1、启动类添加客户端注解@EnableFeignClients
 * 2、添加service接口，接口使用注解标识需要调用的服务器及方法
 *              @FeignClient(name = "eureka-productor")       //标识服务器
 *              @RequestMapping(value = "/prductior/date")   //标识调用方法
 *
 * 3、客户端调用service，注入接口调用
 */




@EnableFeignClients
@SpringBootApplication
public class ProducerFeignApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProducerFeignApplication.class, args);
    }

}
